﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
  <Style TargetType="ToggleButton" >
    <Setter Property="Cursor" Value="Hand" />
    <Setter Property="OverridesDefaultStyle" Value="True" />
    <Setter Property="SnapsToDevicePixels" Value="True" />
    <Setter Property="MinWidth" Value="70" />
    <Setter Property="MinHeight" Value="25" />
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="ToggleButton">
          <Border  Width="{TemplateBinding Width}" x:Name="border" Height="{TemplateBinding Height}" 
                     BorderThickness="1" BorderBrush="#5fa9a9"  >
            <Border.Background>
              <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
                <LinearGradientBrush.GradientStops>
                  <GradientStop Offset="0" Color="#fff" />
                  <GradientStop Offset="0.855" Color="#c7efeb"/>
                  <GradientStop Offset="0.488" Color="#89e0d6" />
                  <GradientStop Offset="1" Color="#e3eeed" />
                </LinearGradientBrush.GradientStops>
              </LinearGradientBrush>
            </Border.Background>
            <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" 
                                    TextBlock.FontSize="12" TextBlock.Foreground="#008685" VerticalAlignment="Center" >
              <ContentPresenter  RecognizesAccessKey="True" />
            </StackPanel>
          </Border>
          <ControlTemplate.Triggers>
            <Trigger Property="IsMouseOver" Value="True" >
              <Setter TargetName="border" Property="Background"  >
                <Setter.Value>
                  <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
                    <LinearGradientBrush.GradientStops>
                      <GradientStop Offset="0" Color="#fff" />
                      <GradientStop Offset="0.866" Color="#FF9AF5F3"/>
                      <GradientStop Offset="0.488" Color="#FF92E8E4" />
                      <GradientStop Offset="1" Color="#e3eeed" />
                    </LinearGradientBrush.GradientStops>
                  </LinearGradientBrush>
                </Setter.Value>
              </Setter>
            </Trigger>
            <Trigger Property="IsChecked" Value="True" >
              <Setter TargetName="border" Property="Background"  >
                <Setter.Value>
                  <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
                    <LinearGradientBrush.GradientStops>
                      <GradientStop Offset="0" Color="#fff" />
                      <GradientStop Offset="0.855" Color="#FF74FCF5"/>
                      <GradientStop Offset="0.488" Color="#FF36B7AC" />
                      <GradientStop Offset="1" Color="#e3eeed" />
                    </LinearGradientBrush.GradientStops>
                  </LinearGradientBrush>
                </Setter.Value>
              </Setter>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>

  <Style TargetType="Button">
    <Style.Setters>
      <Setter Property="MinWidth" Value="40" />
      <Setter Property="MinWidth" Value="20" />
      <Setter Property="Template">
        <Setter.Value>
          <ControlTemplate TargetType="Button">
            <Border Width="{TemplateBinding Width}" Height="{TemplateBinding Height}" 
                    x:Name="border" BorderBrush="#28460A"  BorderThickness="1" Background="#122033">
              <ContentPresenter   TextBlock.Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center"/>
            </Border>
            <ControlTemplate.Triggers>
              <Trigger Property="IsMouseOver" Value="True">
                <Setter Property="Cursor" Value="Hand" />
                <Setter Property="BorderBrush" TargetName="border" Value="#2D76CA" />
                <Setter Property="Background" TargetName="border" Value="#163B66" />
              </Trigger>
              <Trigger Property="IsPressed" Value="True">
                <Setter Property="BorderBrush" TargetName="border" Value="#2F7AD5" />
                <Setter Property="Background" TargetName="border" >
                  <Setter.Value>
                    <RadialGradientBrush Center="0.5,0.5" >
                      <RadialGradientBrush.GradientStops>
                        <GradientStop Color="#FF5959D8"  Offset="0"/>
                        <GradientStop Color="#193A64"  Offset="1"/>
                      </RadialGradientBrush.GradientStops>
                    </RadialGradientBrush>
                  </Setter.Value>
                </Setter>
              </Trigger>
            </ControlTemplate.Triggers>
          </ControlTemplate>
        </Setter.Value>
      </Setter>
    </Style.Setters>
  </Style>

  <Style x:Key="{x:Type RadioButton}" TargetType="{x:Type RadioButton}">
    <Setter Property="SnapsToDevicePixels" Value="true"/>
    <Setter Property="OverridesDefaultStyle" Value="true"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type RadioButton}">
          <BulletDecorator Background="Transparent">
            <BulletDecorator.Bullet>
              <Grid Width="13" 
              Height="13" >
                <Ellipse x:Name="Border"  
                Fill="#C0C0C0"
                StrokeThickness="1"
                Stroke="#404040" />
                <Ellipse x:Name="CheckMark"
                Margin="4"
                Fill="#404040" />
              </Grid>
            </BulletDecorator.Bullet>
            <ContentPresenter 
            Margin="4,0,0,0"
            TextBlock.Foreground="White"
            VerticalAlignment="Center"
            HorizontalAlignment="Left"
            RecognizesAccessKey="True"/>
          </BulletDecorator>
          <ControlTemplate.Triggers>
            <Trigger Property="IsChecked" Value="false">
              <Setter TargetName="CheckMark" Property="Visibility" Value="Collapsed"/>
            </Trigger>
            <Trigger Property="IsMouseOver" Value="true">
              <Setter TargetName="Border" Property="Fill" Value="#808080" />
            </Trigger>
            <Trigger Property="IsPressed" Value="true">
              <Setter TargetName="Border" Property="Fill" Value="#E0E0E0" />
              <Setter TargetName="Border" Property="Stroke" Value="#404040" />
            </Trigger>
            <Trigger Property="IsEnabled" Value="false">
              <Setter TargetName="Border" Property="Fill" Value="#EEEEEE" />
              <Setter TargetName="Border" Property="Stroke" Value="#40000000" />
              <Setter Property="Foreground" Value="#80000000"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
</ResourceDictionary>